package com.example.chain.product;

/**
 * @author zhoubin
 */
public class ProductService {

    public String redeem(String acctId){

        System.out.println("理财产品赎回=====>");
        ValidateUserHandler validateUser = new ValidateUserHandler();
        ValidateProductHandler validateProduct = new ValidateProductHandler();
        RedeemHandler redeem = new RedeemHandler();

        Handler.Builder builder = new Handler.Builder();
        Handler build = builder.add(validateUser).add(validateProduct).add(redeem).build();
//        Handler build = builder.add(validateUser).build();
        return build.doHandler(new UserAccount(acctId));


    }

}
